/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-08-01
 * Time: 21:33
 */
public class Test2 {
    public static void main(String[] args) {
        double[] array={11,25,31,43,56,11,46,33};
        System.out.println("和的值是"+ add(array));
    }
    public static double add(double[] array) {
        double sum=0.0;
        for(int i=0;i< array.length;i++) {
            sum += array[i];
        }
        return sum;
    }
}
